<template>
  <div class="recommendation">
    <div
      v-for="(o, index) in pecommendationList"
      @click="
        () => {
          sendMessage(o);
        }
      "
      :key="index"
      class="recommend-prompt-item"
    >
      {{ o }}
      <i class="el-icon-arrow-right"></i>
    </div>
  </div>
</template>
  
  <script>
export default {
  name: "RecommendationList",
  props: {
    pecommendationList: {
      type: Array,
      default: [],
    },
  },
  methods: {
    sendMessage(msaage) {
      this.$emit("send-message", msaage);
    },
  },
};
</script>
  
  <style scoped lang="scss">
.recommendation {
  display: flex;
  flex-direction: column;
  .recommend-prompt-item {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    margin-right: auto;
    overflow: hidden;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
    line-height: 20px;
    min-height: 20px;
    padding: 8px 12px;
    cursor: pointer;
    background: #F5F5F5;
    border-radius: 8px;
    margin-bottom: 8px;
    font-size: 14px;
    color: #0E0E0E;
    line-height: 22px;
    i {
      // margin-left: 30px;
    }
  }
}
</style>